//
//  SelectDormViewController.swift
//  ElectrickService
//
//  Created by David on 2017/6/16.
//  Copyright © 2017年 David. All rights reserved.
//

import Cocoa

class SelectDormViewController: NSViewController, NSBrowserDelegate {

    @IBOutlet var browser: NSBrowser!
    @IBOutlet var comfirmBtn: NSButton!
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do view setup here.
        
//        preferredContentSize = NSSize(width: 450, height: 300)
        preferredContentSize = view.frame.size
        print(view.frame.size)
        view.autoresizesSubviews = false
        
        browser.delegate = self
        
    }
    @IBAction func confirmBtnClick(_ sender: Any) {
        
    }
    @IBAction func cancelBtnClick(_ sender: Any) {
        dismiss(self)
    }
    
    let list = ["1","2","3"]
    
    func browser(_ sender: NSBrowser, numberOfRowsInColumn column: Int) -> Int {
        return list.count
    }
    
    func browser(_ browser: NSBrowser, numberOfChildrenOfItem item: Any?) -> Int {
        return 3
    }
    
    func browser(_ sender: NSBrowser, willDisplayCell cell: Any, atRow row: Int, column: Int) {
        
    }
    
}
